const express = require('express')

const fs = require('fs')

const app = express()

app.get('students', (req, res) => {
    fs.readFile('student.html', (err, data) => {
        if(err){
            res.status(500).send('err 404')
            console.log(err+'文件读取失败404')
        }
        console.log('读取文件成功！')
        res.render('student.html')
    })
})

app.listen('5000', () => {
    console.log('server is running')
})
